const navTo = (url = '') => {
	url = String(url);
	if (url.indexOf('http') != -1) {
		var token = uni.getStorageSync('token') ? uni.getStorageSync('token') : '';
		if (url.indexOf('?') != -1) {
			url = url + '&JiuT=' + token;
		} else {
			url = url + '?JiuT=' + token;
		}
		url = escape(url);
		uni.navigateTo({
			url: "/pages/web/web-view?url=" + url
		})
	} else {
		if (url.indexOf('/index/home') != -1 || url.indexOf('/index/mygroup') != -1 || url.indexOf(
			'/blindBox/list') != -1 || url.indexOf('/index/giftcard') != -1 || url.indexOf('/index/user') != -1) {
			uni.switchTab({
				url
			})
		} else {
			uni.navigateTo({
				url
			})
		}
	}
}
export default navTo